from typing import Optional
from datetime import datetime
from pydantic import BaseModel

class AirticketOrderBase(BaseModel):
    work_area_id: int = -1
    package_order_id: int = -1
    package_order_title: Optional[str] = None
    customer_profile_id: Optional[int] = None
    BookRecordName: str
    OfficeNo: str
    TicketType: str
    TotalPrice: float
    TotalTicketPrice: float
    OrderStatus: str
    CustomerConfirmed: bool
    CustomerMemo: str
    InternalMemo: str
    Summary: Optional[str] = None
    IssueChannel: str

class AirticketOrderCreate(AirticketOrderBase):
    pass

class AirticketOrderUpdate(BaseModel):
    package_order_id: Optional[int] = None
    package_order_title: Optional[str] = None
    BookRecordName: Optional[str] = None
    OfficeNo: Optional[str] = None
    TicketType: Optional[str] = None
    TotalPrice: Optional[float] = None
    TotalTicketPrice: Optional[float] = None
    OrderStatus: Optional[str] = None
    CustomerConfirmed: Optional[bool] = None
    CustomerMemo: Optional[str] = None
    InternalMemo: Optional[str] = None
    Summary: Optional[str] = None
    IssueChannel: Optional[str] = None

class AirticketOrder(AirticketOrderBase):
    ID: int

    class Config:
        from_attributes = True 